package com.jerry;


import com.jerry.dbutils.BaseDao;
import com.jerry.dbutils.DataBaseUtils;
import com.jerry.entity.SysOperLog;
import com.jerry.orm.SqlSession;
import org.noear.socketd.SocketD;
import org.noear.socketd.transport.core.Session;

import java.util.List;

public class Main {
    public static void main(String[] args) throws Exception {

        //进度条测试
/*       long size = 1003;
        String url = "https://repo1.maven.org/maven2/org/springframework/spring-core/5.2.5.RELEASE/spring-core-5.2.5.RELEASE-javadoc.jar";

        PrintProgressBar pb = new PrintProgressBar();
        pb.LocalPrintProgressBar(size);
        pb.PrintProgressBarByUrl(url);*/


        //消息队列测试
//        Session session = (Session) SocketD.createClient("sd:ws://127.0.0.1:8602/?u=a&p=2")
//                .open();
        String sql= "SELECT * from sys_oper_log t WHERE t.oper_id=101";
//        SysOperLog listBean = DataBaseUtils.getBean(sql, SysOperLog.class);
//            System.out.println(listBean.toString());
//
//        System.out.println("--------------------");
//            List<SysOperLog> objects = new SqlSession().selectList(sql, null, SysOperLog.class);
//            for (SysOperLog sysOperLog : objects) {
//                System.out.println(sysOperLog.toString());
//            }

        List<SysOperLog> sysOperLogs = new BaseDao().executeQuery(SysOperLog.class, sql);
             for (SysOperLog sysOperLog : sysOperLogs) {
                System.out.println(sysOperLog.toString());




            }


    }
}